#ifndef MEMORY_H
#define MEMORY_H

#define MEM_FEATURES_NONE		0
#define MEM_FEATURES_PHYS		1
#define MEM_FEATURES_VIRT		2
#define MEM_FEATURES_HEAP		4

#define MEM_STATE_USED			1
#define MEM_STATE_FREE			0

#define MEM_TYPE_USEABLE		1
#define MEM_TYPE_RESERVED		2
#define MEM_TYPE_ACPI			3
#define MEM_TYPE_NVS				4
#define MEM_TYPE_BAD				5

#include "multiboot.h"

void init_memory(u32int mem_size_bytes, multiboot_info_t* mbd);
void init_mem_interface(void);

u32int kmalloc(u32int size);
void kfree(void *p);

//returns a pointer to a chunck of free memory of the given size
u32int phys_alloc(u32int size);

//frees a single frame at the given address
int phys_free(u32int addr);

#endif
